ComponentOne PDF for .NET
AddAttachment(String,Byte[],RectangleF,AttachmentIconEnum,Color) Method

C1.C1Pdf.4 Assembly > C1.C1Pdf Namespace > C1PdfDocument Class > AddAttachment Method : AddAttachment(String,Byte[],RectangleF,AttachmentIconEnum,Color) Method
Name to be shown next to the attachment.
Byte array containing the attachment data.
Area of the page that will contain the attachment (in points measured from the top-left corner of the page).
AttachmentIconEnum value that determines the appearance of the attachment icon.
The color of the attachment icon.
Adds a stream-based attachment to the current page.
Syntax
'Declaration
 
Public Overloads Sub AddAttachment( _
   ByVal attachmentName As System.String, _
   ByVal attachmentData() As System.Byte, _
   ByVal rc As System.Drawing.RectangleF, _
   ByVal icon As AttachmentIconEnum, _
   ByVal iconColor As System.Drawing.Color _
) 
public void AddAttachment( 
   System.string attachmentName,
   System.byte[] attachmentData,
   System.Drawing.RectangleF rc,
   AttachmentIconEnum icon,
   System.Drawing.Color iconColor
)

Parameters

attachmentName
Name to be shown next to the attachment.
attachmentData
Byte array containing the attachment data.
rc
Area of the page that will contain the attachment (in points measured from the top-left corner of the page).
icon
AttachmentIconEnum value that determines the appearance of the attachment icon.
iconColor
The color of the attachment icon.
Remarks
This override allows you to add attachments containing data that does not come from files. For example, the data could come from blobs or streams stored in a database.
See Also

Reference

C1PdfDocument Class
C1PdfDocument Members
Overload List